<!DOCTYPE html>
<html lang="en">
<head>
    <title>佳怡供应链金融</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">
    <link rel="stylesheet" href="lib/weui.min.css">
    <link rel="stylesheet" href="css/jquery-weui.css">
    <link rel="stylesheet" href="demos/css/demos.css">
    <link rel="stylesheet" href="font/fontscss/iconfont.css">
    <link rel="stylesheet" href="css/common.css">
    <style type="text/css">
        .weui-cells {
            /*margin-bottom: 15%;*/
            top: 1.3rem;
        }

        .weui-cells_checkbox .weui-cell__hd {
            width: 8%;
            float: left;
        }

        .weui_cells .weui-row {
            background: #fff;
        }

        .itemtop {
            font-size: 16px;
            margin-bottom: 0.5rem;
            margin-top: 0.5rem;
        }

        .itemtop .mc {
            border-left: 6px solid #FF9461;
            padding-left: 1rem;
            margin-top: 0.2rem;
            margin-left: 1rem;
        }
        .itemtop .sj{
            display: inline;
            color: #FF9461;
            font-size: 12px;
            width: 0%;
            margin-left: 0rem;
        }
        span {
            width: 24%;
            display: inline-block;
            margin-left: 1rem;
        }

        .itembommon {
            text-align: center;
            line-height: 1.5rem;
        }

        .itembommon .content {
            color: #FF9461;
            font-size: 14px;
        }

        .itembommon .content-title {
            color: #A2A2A2;
            font-size: 14px;
        }

        #project {
            margin-top: 0.3rem;
        }

        .input_left span {
            position: absolute;
            line-height: 30px;
            left: 10px;
            top: 8px;
            font-size: 18px;
            color: #333;
        }

        .input_left .weui-col-50 input {
            color: #333;
            width: 100%;
            padding-left: 35px;
            height: 45px;
            border: none;
            box-sizing: border-box;
            line-height: 35px;
            font-size: 18px;
            border-right: 1px solid #dcdcdc;
        }

        .input_right input {
            border-radius: 4px;
            height: 45px;
            line-height: 45px;
            box-sizing: border-box;
        }

        .content-padded .weui_article section {
            margin-bottom: 0;
            width: 100%;
        }

        .approve_list li {
            border-bottom: 1px solid #e6e6e6;
            padding: 10px 15px;
            font-size: 16px;
        }

        .icon_back{
            position: absolute;
            left: -1rem;
            top: 0.9rem;
            width: 0.5rem;
            height: 1.0rem;
            background: url(./images/icon-back.png);
            background-size: 0.5rem 1em;
            vertical-align: middle;
        }

        p {
            font-family: PingFangSC-Regular;
            color: #FFFFFF;
            letter-spacing: 0;
        }

        ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        ul li p {
            color: #111111;
        }

        #project li {
            /* height: 7.6rem;*/
            overflow:auto;
            position: relative;
            border-bottom: 1px solid #ececec;
        }

        .open-popup:after {
            content: " ";
            display: inline-block;
            height: 6px;
            width: 6px;
            border-width: 2px 2px 0 0;
            border-color: #c8c8cd;
            border-style: solid;
            -webkit-transform: matrix(.71, .71, -.71, .71, 0, 0);
            transform: matrix(.71, .71, -.71, .71, 0, 0);
            position: relative;
            top: -2px;
            position: absolute;
            top: 50%;
            right: 15px;
            margin-top: -4px;
        }

        .open-popup:active {
            background-color: #ececec;
        }
        .time {
            background: #EFEFEF;
            text-align: center;
        }

        .time_left {
            width: 50%;
            display: inline-block;
            line-height: 1.5rem;
        }

        .span1 {
            font-size: 14px;
            opacity: 0.6;
        }

        .span2 {
            font-size: 14px;
            opacity: 0.6;
        }

        .time_left span {
            display: block;
        }

        .time_right {
            width: 48%;
            float: left;
            line-height: 1.5rem;
        }

        .time_right span {
            display: block;
        }
    </style>
    <script src="lib/jquery-2.1.4.js"></script>

</head>

<body>

<header>
    <div class="weui-row weui-no-gutter">
        <div class="weui-col-33" id="back_icon">
            <a href="" onclick="goBack()" class="icon pull-right"><i class="icon_back"></i></a>
        </div>
        <div class="weui-col-33">投资确认</div>
        <div class="weui-col-33">
        </div>
    </div>
</header>
<!--<div style="padding-top: 50px;">
    <form>
        <div>项目名称：<input type="text"></div>
    </form>

</div>-->
<!-- 内容 -->
<input type="hidden" id="names" name="project_names"/>
<input type="hidden" id="states" name="state"/>
<<!--div id="container" class="container" style="padding-top: 50px">
    <div class="page input js_show">

        <div class="page__bd">

            <div class="weui-cell__ft" style="text-align: center">
                <a href="javascript:;" class="showIOSDialog2">
                搜索
                </a>
            </div>
        </div>
    </div>

</div>
</div>
-->
<div class="weui-cells" >

    <div style="background: #FFFFFF;">
        <ul id="project">
            <!--<li class="open-popup" data-target="#half">
                <div class="itemtop">
                    <span class="mc">项目名称</span>
                    <span class="sj">申请时间：2016-01-01 11:11:00</span>
                </div>
                <div class="itembommon">
                    <div class="content-title">
                        <span class="leftborder">申请人</span>
                        <span class="leftborder">申请金额</span>
                        <span>审核状态</span>
                    </div>
                    <div class="content">
                        <span class="leftborder">朱左鹏</span>
                        <span class="leftborder">10000</span>
                        <span>未审核</span>
                    </div>

                </div>
            </li>-->
        </ul>

    </div>
</div>
</body>
<script src="js/circleProgress.js"></script>
<script src="js/jquery-weui.js"></script>
<script src="js/dropload.js"></script>
<link rel="stylesheet" href="js/dropload.css">
<script src="js/reg.js"></script>

<script type="text/javascript">

    $("#project").on("click","li",function () {
            window.location.href="investConfirmInfo.html"

        localStorage.setItem("sq_id",$(this).attr("data-id"));
        localStorage.setItem("sq_proId",$(this).attr("data-proId"));
    });
    var page=0;
    // 每页展示6个
    var size = 6;
    function loadProDataTop(me) {
        var member_category= localStorage.getItem("member_category");
        var userid=localStorage.getItem("token");

        $.ajax({
            type: "POST",
            url : "productInvestment/getcostInfo",
            data: {page: page * 1, rows: size,member_category:member_category,userid:userid
            },
            success: function (msg) {
                var str = "";
                console.log(msg);
                if (msg != "" && msg != null) {
                    page = page + 6;
                    $.each(msg, function (x, y) {
                        var amount= y.product_investment_amount;

                        str+="<li class= \"open-popup\" data-id=\""+y.id+"\" data-proId=\""+y.product_investment_amount+"\">"
                        str+=" <div style='margin-left: 20px;/*color: #A2A2A2;*/font-size: 16px;' >"
                        str+=""+y.product_name+""
                        str+="</div>"
                        str+=" <div class=\"itemtop\">"
                        //  str+="   <span class=\"mc\" style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>"+y.project_name+"</span>"
                        // str+="   <span class=\"sj\">申请时间："+y.apply_time+"</span>"
                        //  str+="   <div class=\"sj\" style='margin-left: 20px;'>申请时间："+y.apply_time+"</div>"

                        str+="</div>"
                        str+="<div class=\"time\">"
                        str+="  <div class=\"time_left\">"
                        str+="   <div class=\"span1\">"+ y.end_time+"</div>"
                        str+="<div class=\"span2\">投资结束时间</div>"
                        str+="</div>"
                        str+=" <div class=\"time_right\">"
                        str+=" <div class=\"span1\">"+y.investment_start_time+"</div>"
                        str+="<div class=\"span2\">投资开始时间</div>"
                        str+="</div>"
                        str+="</div>"
                        str+="<div class=\"itembommon\">"
                        str+="   <div class=\"content-title\">"
                        //str+="    <span class=\"leftborder\">投资状态</span>"
                        str+="    <span class=\"leftborder\">投资金额</span>"
                        str+="    <span class=\"leftborder\">投资状态</span>"
                        str+="    <span>提现状态</span>"
                        str+="    </div>"
                        str+="   <div class=\"content\">"
                        // str+="    <span class=\"leftborder\" id='zhuangtai'>"+(y.product_investment_amount>0?"已投资":"未投资")+"</span>"
                        str+="    <span class=\"leftborder\" >"+y.investment_amount+"</span>"
                        str+="   <span class=\"leftborder\">"+(y.investment_status==0?"未确认":(y.investment_status==1?"已确认":(y.investment_status==2?"审核通过":(y.investment_status==3?"驳回":(y.investment_status==4?"已确认待审核":"")))))+"</span>"
                        str+="   <span>"+(y.application_status==0?"未申请":(y.application_status==1?"待确认":(y.application_status==2?"已确认":(y.application_status==3?"审核通过":(y.application_status==4?"驳回":(y.application_status==5?"已确认待审核":""))))))+"</span>"
                        str+="  </div>"
                        str+="    </div>"
                        str+="    </li>"
                    })


                }else{
                    // 锁定
                    me.lock();
                    // 无数据
                    me.noData();
                }

                // 为了测试，延迟1秒加载
                setTimeout(function(){
                    // 插入数据到页面，放到最后面

                    $("#project").append(str);

                    me.resetload();
                },1000);


            },error: function(xhr, type){
                alert('Ajax error!');
                // 即使加载出错，也得重置
                me.resetload();
            }
        });
    }
    function loadProDataDow(me) {

        var str = "";
        var project_names=$("#names").val();
        var state=$("#states").val();
        var member_category= localStorage.getItem("member_category");
        var userid=localStorage.getItem("token");
        $.ajax({
            type: "POST",
            url : "productInvestment/getcostInfo",
            data: {page: page * 1, rows: size,member_category:member_category,userid:userid
            },
            success: function (msg) {
                console.log(msg);
                if (msg != "" && msg != null) {
                    page = page + 6;
                    $.each(msg, function (x, y) {
                        var amount= y.product_investment_amount;

                        str+="<li class= \"open-popup\" data-id=\""+y.id+"\" data-proId=\""+y.product_investment_amount+"\">"
                        str+=" <div style='margin-left: 20px;/*color: #A2A2A2;*/font-size: 16px;' >"
                        str+=""+y.product_name+""
                        str+="</div>"
                        str+=" <div class=\"itemtop\">"
                        //  str+="   <span class=\"mc\" style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>"+y.project_name+"</span>"
                        // str+="   <span class=\"sj\">申请时间："+y.apply_time+"</span>"
                        //  str+="   <div class=\"sj\" style='margin-left: 20px;'>申请时间："+y.apply_time+"</div>"

                        str+="</div>"
                        str+="<div class=\"time\">"
                        str+="  <div class=\"time_left\">"
                        str+="   <div class=\"span1\">"+ y.end_time+"</div>"
                        str+="<div class=\"span2\">投资结束时间</div>"
                        str+="</div>"
                        str+=" <div class=\"time_right\">"
                        str+=" <div class=\"span1\">"+y.investment_start_time+"</div>"
                        str+="<div class=\"span2\">投资开始时间</div>"
                        str+="</div>"
                        str+="</div>"
                        str+="<div class=\"itembommon\">"
                        str+="   <div class=\"content-title\">"
                        //str+="    <span class=\"leftborder\">投资状态</span>"
                        str+="    <span class=\"leftborder\">投资金额</span>"
                        str+="    <span class=\"leftborder\">投资状态</span>"
                        str+="    <span>提现状态</span>"
                        str+="    </div>"
                        str+="   <div class=\"content\">"
                        // str+="    <span class=\"leftborder\" id='zhuangtai'>"+(y.product_investment_amount>0?"已投资":"未投资")+"</span>"
                        str+="    <span class=\"leftborder\" >"+y.investment_amount+"</span>"
                        str+="   <span class=\"leftborder\">"+(y.investment_status==0?"未确认":(y.investment_status==1?"已确认":(y.investment_status==2?"审核通过":(y.investment_status==3?"驳回":(y.investment_status==4?"已确认待审核":"")))))+"</span>"
                        str+="   <span>"+(y.application_status==0?"未申请":(y.application_status==1?"待确认":(y.application_status==2?"已确认":(y.application_status==3?"审核通过":(y.application_status==4?"驳回":(y.application_status==5?"已确认待审核":""))))))+"</span>"
                        str+="  </div>"
                        str+="    </div>"
                        str+="    </li>"
                    })


                }else{
                    // 锁定
                    me.lock();
                    // 无数据
                    me.noData();
                }

                // 为了测试，延迟1秒加载
                setTimeout(function(){
                    // 插入数据到页面，放到最后面

                    $("#project").append(str);

                    me.resetload();
                },1000);


            },error: function(xhr, type){
                alert('Ajax error!');
                // 即使加载出错，也得重置
                me.resetload();
            }
        });
    }


    $(function(){

        $('.weui-cells').dropload({
            scrollArea : window,
            domUp : {
                domClass   : 'dropload-up',
                domRefresh : '<div class="dropload-refresh">↓下拉刷新</div>',
                domUpdate  : '<div class="dropload-update">↑释放更新</div>',
                domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中</div>'
            },
            domDown : {
                domClass   : 'dropload-down',
                domRefresh : '<div class="dropload-refresh">↑上拉加载更多</div>',
                domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中</div>',
                domNoData  : '<div class="dropload-noData">暂无数据</div>'
            },
            loadUpFn : function(me){
                page=0;
                loadProDataTop(me);
            },
            loadDownFn : function(me){
                loadProDataDow(me);
            },
            threshold : 50
        });});
</script>
<script type="text/javascript">
    function  goBack(){
        localStorage.removeItem("names");
        localStorage.removeItem("state");
        /*localStorage.setItem("names","");
         localStorage.setItem("state","");*/
        history.go(-1);
    }
    $(function(){
        var $iosDialog1 = $('#iosDialog2');

        $('.showIOSDialog2').on('click', function(){

            $.modal({
                title: "查询条件",
                text: "项目名称：<input type='text' id='project_names' style='width:120px' ><br><br>  " +
                " 审核状态：<input type='text' id='state' style='width:120px' ><br><br> ",

                buttons: [
                    { text: "查询", onClick: function(){
                        $("#names").val($("#project_names").val());
                        $("#states").val($("#state").val());
                        localStorage.setItem("names",$("#project_names").val());
                        localStorage.setItem("state",$("#state").val());
                        window.location.href="mysq.html";

                    } },
                    { text: "取消", className: "default", onClick: function(){ console.log(3)} },
                ]
            });
        });


    });

</script>
<script src="js/web/checkLogin.js"></script>
</html>